<template>
  <div class="container">
    <!--选项 -->
    <Filter :filterList="filterList"></Filter>
    <!--导航 -->
    <Order></Order>
    <!--视频-->
    <div style="min-height: 700px">
      <VideoCard :videoData="videoList"></VideoCard>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, onMounted } from 'vue';
import { ElLoading, ElMessage } from 'element-plus';

export default defineComponent({
  name: 'OffLive',
});
</script>

<script setup lang="ts">
import Order from '../components/order.vue';
import useClassStore from '@/store/class';
import { storeToRefs } from 'pinia';
onMounted(async () => {
  try {
    ElLoading.service({ fullscreen: true });
     //获取列表
    await classStore.getFilterList();
    //获取视频列表
    await   classStore.getVideoList();
    ElLoading.service({ fullscreen: true }).close();
  } catch (err) {
    ElLoading.service({ fullscreen: true }).close();
    ElMessage.error(err);
  }
});
//获取点击数据

const classStore = useClassStore();
const { filterList, videoList } = storeToRefs(classStore);
</script>

<style scoped></style>
